﻿<?php  
//批量采集信息入库 http://www.jma.go.jp/jma/kishou/know/yougo_hp/kousui.html 天气用语
//××××××××××分页生成或执行的方法×××××××××××××
set_time_limit(0);
require_once (dirname(__FILE__) . "/../../include/common.inc.php");
require_once (dirname(__FILE__) . "/../../include/myclass.php");
require_once (dirname(__FILE__) . "/../../include/my/c2j.php");



//分页参数
$start=$_GET["start"];   
if($start==""){$start=0;}   
//分页查询语句
$sql="SELECT id,areanamejp,areanameen ,areasn FROM `n_p_w` WHERE `areaclass` =1  order by areasn  "; 

//查询并且循环输出
$db->Execute('me',$sql); 
$i=1;
while($arr = $db->GetArray()) 
{

$codes=$arr['weathercode'];
$id=$arr['id'];
$citynamejp=$arr['areanamejp'];
$prisn=$arr['areasn'];
//echo '\''.$citynamejp.'\',';

echo 'var ct'.$i.'=new Array(';
							 
		$sql="SELECT id,areanamejp,areanameen,areasn FROM `n_p_w` WHERE `areaclass` >2 and left(areasn,2)='".$prisn."'  order by areanameen";
		$db->Execute('2',$sql); 
		while($arr2 = $db->GetArray(2))		
			{
				
				echo '\''.$arr2['areasn'].','.strtoupper(mb_substr($arr2['areanameen'],0,1)).'-'.$arr2['areanamejp'].'\',';
				
				}
		
		//echo $sql;
						
echo ');';

$i=$i+1;

}


  
?>  